package com.qf.feign;

import com.qf.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author Ypl
 * @version V1.0
 * @Project OctoberAndNovember
 * @Package com.qf.feign
 * @Description:
 * @Date 2022/11/2 19:14
 */
@SuppressWarnings("all")
//@FeignClient(value = "QF-GOODS",fallback = Goods FallBack.class)
@FeignClient(value = "QF-GOODS")
public interface Feign {

    /**
     * 路径和被调用方的访问路径一定要相同，一模一样
     * 方法必须一致  /get/post ...
     */
    @RequestMapping("/query")
    public String queryGoods();

    @GetMapping("/query2")
    public String queryGoods2(@RequestParam int id, @RequestParam String name);

    @GetMapping("/query3/{id}")
    public String queryGoods3(@PathVariable(value = "id") Integer id);

    @PostMapping("/query4")
    public String queryGoods4(@RequestBody User user);

}
